<template>
    <div class="md_view">
        <div class="md_title"></div>
        <mavon-editor class="md md_body" :value="webDataString" :subfield="false" :defaultOpen="'preview'" :toolbarsFlag="false" :editable="false" :scrollStyle="true" :ishljs="true" />
    </div>
</template>

<script>
export default {
    props: ['contentValue'],
    data() {
        return {
            webDataString: '# TITLE',
            content: '',
        }
    },
    mounted() {
        window.action.doc.doc.detail(this.contentValue.id).then(data => {
            console.log(data);
            this.webDataString = data;
        });
    },
}
</script>

<style scoped>
    .md_view {
        position: relative;
        background: #fff;
    }
    .md_title {
        position: absolute;
        width: 100%;
        height: 100px;
        background: #fff;
        top: 0;
        left: 0;
    }
    .md_body {
        position: absolute !important;
        width: 100%;
        top: 100px;
        left: 0;
        right: 0;
        bottom: 0;
    }

</style>